/*
* Copyright (c) 2016 . All Rights Reserved.
*/
package com.cgmnx.admin.biz.rbac;

import com.cgmnx.admin.common.bean.Limiter;
import com.cgmnx.admin.dao.entity.rbac.ResourceEntity;
import com.cgmnx.admin.dao.entity.rbac.ResourceTree;

import java.util.List;

/**
 * @author: created  Date: 16/12/14 Time: 下午4:04
 * @version: 1.0
 */

public interface ResourceBiz {

    Integer save(ResourceEntity resourceEntity);

    Void delete(Integer resourceId);

    Integer update(ResourceEntity resourceEntity);

    Void updateInValidStatus(List<Integer> idList);

    Void updateValidStatus(List<Integer> idList);

    Integer count(String searchName);

    List<ResourceEntity> queryPage(String searchName, Limiter limiter);

    ResourceEntity query(Integer resourceId);

    List<ResourceEntity> queryByUserId(String userId);

    List<ResourceEntity> queryByRoleId(Integer roleId);

    /**
     * 查询uri树
     *
     * @param uriId
     * @return
     */
    List<ResourceTree> queryTree(final Integer uriId);

    List<ResourceEntity> queryAll();
}